﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="shows.aspx.cs" Inherits="dzs.Web.Admin.shows" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <script src="lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.js"></script>
    <script src="../Scripts/mybase.js"></script>
    <link href="../css/myStyle.css" rel="stylesheet" />
    <style type="text/css">
td { font-size: 9pt}
a { color: #000000; text-decoration: none}
    </style>
    <script language="javascript" type="text/javascript">       
        //点击行出现下面的DIV
        function closedialog()
        {
            parent.$(".l-dialog,.l-window-mask").hide();
            parent.update();
            parent.$.ligerDialog.close();
        }
        function setspace(id,name)
        {            
            $("#mys").val("仓位：" + name);
        }
        function checknum()
        {
            if ($("#gridView tr :checkbox:checked").length == 1) {
                var hf=parseFloat($("#hfnum").val());
                var num=parseFloat($("#txtnum").val());
                if (hf>num) {
                    return confirm("物料没有入完是否先入库" + $("#txtnum").val());
                }
                else if (num > hf) { alert('没有这么多物料要入库！'); return false; }
                else { return true; }
            }
            else { alert("请选中一个仓位！"); return false;}
        }
        function enableButton(flag) {
            $("#btnTest").attr("disabled", flag ? "" : "disabled");
        }
        $(document).ready(
        function () {
            $("#btnTest").click(
            function () {
                if (checknum()) {
                    enableButton(false);
                    $("#btnOK").click();//禁用掉自身并调用真正触发回发的按钮的click事件 
                }
            }
            );
        }
        );

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style=" padding:4px;">
    
        仓库：<asp:DropDownList ID="ddlstore" runat="server" >
        </asp:DropDownList>
        <asp:TextBox ID="txtname" runat="server"></asp:TextBox><asp:Button ID="btnsearch" runat="server" Text="查找" OnClick="btnsearch_Click" />
        <asp:HiddenField ID="hfnum" runat="server" />
        
        <br />
            <asp:GridView ID="gridView" runat="server" Width="100%" BorderWidth="0px" CellPadding="0" CellSpacing="1" CssClass="gv" GridLines="None" 
                     DataKeyNames="spid" AutoGenerateColumns="False"  RowStyle-HorizontalAlign="Center"  >
                    <Columns>
                    <asp:TemplateField ControlStyle-Width="30" HeaderText="选择"    >
                                <ItemTemplate>
                                    <asp:CheckBox ID="DeleteThis" runat="server" />
                                </ItemTemplate>

<ControlStyle Width="30px"></ControlStyle>
                            </asp:TemplateField> 
                            
		<asp:BoundField DataField="spname" HeaderText="仓位名称" SortExpression="spname" ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
		<asp:BoundField DataField="sptname" HeaderText="仓位类型" SortExpression="sptname" ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
		<asp:BoundField DataField="spadd" HeaderText="仓位地址" SortExpression="spadd" ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
		<asp:BoundField DataField="sname" HeaderText="仓库" SortExpression="sname" ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
		<asp:BoundField DataField="status" HeaderText="仓位状态" SortExpression="status" ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
                        </Columns>

<RowStyle HorizontalAlign="Center"></RowStyle>
                </asp:GridView>
              <div id="mystore" ><span id="mys0"></span>
入库量：<asp:TextBox ID="txtnum" runat="server" Width="52px" Enabled="false"></asp:TextBox>
              &nbsp;仓位状态：<asp:DropDownList ID="ddlstatus" runat="server">
            <asp:ListItem Value="0">未占</asp:ListItem>
            <asp:ListItem Value="1" Selected="True">未满</asp:ListItem>
            <asp:ListItem Value="2">已满</asp:ListItem>
        </asp:DropDownList>
                  <input type="button" value="确定" id="btnTest"  />
	              <asp:Button ID="btnOK" runat="server" Text="确定" OnClick="btnOK_Click"  style="display:none"/>
              </div>
    
    </div>
    </form>
</body>
</html>
